package edu.nf.dao.impl;




import edu.nf.SQLExecutor;
import edu.nf.beans.annotations.Component;
import edu.nf.dao.AddDepartmDao;
import edu.nf.entity.Departm;
import edu.nf.utils.DBUtil;

import java.sql.SQLException;

@Component("addDepartm")
public class AddDepartmImpl implements AddDepartmDao{

    @Override
    public void addClassInfo(Departm departm) {
        String sql = "INSERT INTO CLASS_INFO VALUES(?,?, 1)";
        SQLException se = new SQLExecutor(DBUtil.getConnection());
        se.executeUpdate(sql, departm.getDepartmId(),departm.getName());
    }
}
